package com.ushio.pointservice.warehouse;

import com.ushio.pointservice.openfeign.Openfeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/warehouse")
public class Warehouse {

    @Autowired
    Openfeign openfeign;

    @GetMapping("/text")
    public List<Map<String, String>> text(@RequestParam String type){
        Map<String,String> map = new HashMap<>();
        map.put("type",type);
        List<Map<String, String>> commodity = openfeign.getCommodity(map);
        return commodity;
    }
}
